/*
 * clog_format.c
 *
 *  Created on: 2012-8-18
 *      Author: lin
 */

#include "clog_format.h"

clog_format_t *clog_format_new(const char *line) {

}
void clog_format_free(clog_format_t *format) {
    zfree(format);
}
clog_format_t *clog_format_dup(const clog_format_t *src) {
    int nlen = strlen(src->name) + 1;
    int plen = strlen(src->pattern) + 1;
    int clen = nlen + plen;
    clog_format_t *format = zmalloc(sizeof(clog_format_t) + clen);
    memcpy(format->content, src->content, clen);
    format->name = format->content;
    format->pattern = format->content + nlen;
    return format;
}

int clog_format_guess_enough(clog_format_t *format,clog_event_t *event,int32_t buflen){

}
int clog_format_gen_msg(const clog_format_t *format,clog_event_t *event,char *buf,int32_t buflen){

}
